import cv2 as cv

img=cv.imread(r'Lena.jpg')
imgGray=cv.cvtColor(img,cv.COLOR_BGR2GRAY)
'''
averImg = cv.blur(img,(5,5))
GaussImg = cv.GaussianBlur(img,(5,5),0)

medianImg=cv.medianBlur(img,5)

cv.imshow('average',averImg)
cv.imshow('Gauss',GaussImg)
cv.imshow('median',medianImg)
cv.waitKey()
cv.destroyAllWindows()
'''
Sobel=cv.Sobel(img,cv.CV_8U,1,1)
Canny=cv.Canny(img,100,150)
Sobel_Gray=cv.Sobel(imgGray,cv.CV_8U,1,1)
Canny_Gray=cv.Canny(imgGray,100,150)

cv.imshow('Sobel',Sobel)
cv.imshow('Canny',Canny)
cv.imshow('SobelGray',Sobel_Gray)
cv.imshow('CannyGtay',Canny_Gray)
cv.waitKey()
cv.destroyAllWindows()
